import re

if __name__ == '__main__':
    logs = '''
    111.30.144.7 "POST /mock/login/?t=GET HTTP/1.1" 200 
    111.30.144.7 "Get /mock/users/?t=POST HTTP/1.1" 200 
    111.13.100.92 "Post /mock/login/ HTTP/1.1" 200 
    223.88.60.88 "GET /mock/users/?t=POST HTTP/1.1" 200 
    111.30.144.7 "GET /mock/users/ HTTP/1.1" 200 
    '''
    res = {}
    log_list = logs.split(sep="\n")
    pattern = re.compile(r'"(\w+) ')
    for i in log_list:
        match_obj = pattern.search(i)
        if match_obj:
            match_string = match_obj.group(1).upper()
            res[match_string] = res.get(match_string, 0) + 1
    for key, value in res.items():
        print(f"{key} {value}")
